package math

import (
	"lesson01/instructions/base"
	"lesson01/rtda"
)

type IOr struct {
	base.NoOperandsInstruction
}

func (e *IOr) Execute(frame *rtda.Frame) {
	stack := frame.OperandStack()
	v2 := stack.PopInt()
	v1 := stack.PopInt()
	res := v2 | v1
	stack.PushInt(res)
}

type LOr struct {
	base.NoOperandsInstruction
}

func (e *LOr) Execute(frame *rtda.Frame) {
	stack := frame.OperandStack()
	v2 := stack.PopLong()
	v1 := stack.PopLong()
	res := v2 | v1
	stack.PushLong(res)
}
